home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / AIncludes / QD3DMath.a < prev    next >
Encoding:
Text File  |  1998-04-09  |  33.9 KB  |  1,138 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        QD3DMath.a
  3. ;
  4. ;    Contains:    Math & matrix routines and definitions.                            
  5. ;
  6. ;    Version:    Technology:    Quickdraw 3D 1.5.4
  7. ;                Release:    QuickTime 3.0
  8. ;
  9. ;    Copyright:    © 1995-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__QD3DMATH__') = 'UNDEFINED' THEN
  19. __QD3DMATH__ SET 1
  20.  
  21.     IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
  22.     include 'QD3D.a'
  23.     ENDIF
  24.  
  25. ; ******************************************************************************
  26. ; **                                                                             **
  27. ; **                            Constant Definitions                             **
  28. ; **                                                                             **
  29. ; ****************************************************************************
  30.  
  31. ; *  Real zero definition
  32.  
  33. ; *  Values of PI
  34.  
  35.  
  36.  
  37. ; ******************************************************************************
  38. ; **                                                                             **
  39. ; **                            Miscellaneous Functions                             **
  40. ; **                                                                             **
  41. ; ****************************************************************************
  42.  
  43.  
  44. ; ******************************************************************************
  45. ; **                                                                             **
  46. ; **                            Point and Vector Creation                         **
  47. ; **                                                                             **
  48. ; ****************************************************************************
  49.  
  50. ;
  51. ; extern TQ3Point2D *Q3Point2D_Set(TQ3Point2D *point2D, float x, float y)
  52. ;
  53.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  54.         IMPORT_CFM_FUNCTION Q3Point2D_Set
  55.     ENDIF
  56.  
  57. ;
  58. ; extern TQ3Param2D *Q3Param2D_Set(TQ3Param2D *param2D, float u, float v)
  59. ;
  60.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  61.         IMPORT_CFM_FUNCTION Q3Param2D_Set
  62.     ENDIF
  63.  
  64. ;
  65. ; extern TQ3Point3D *Q3Point3D_Set(TQ3Point3D *point3D, float x, float y, float z)
  66. ;
  67.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  68.         IMPORT_CFM_FUNCTION Q3Point3D_Set
  69.     ENDIF
  70.  
  71. ;
  72. ; extern TQ3RationalPoint3D *Q3RationalPoint3D_Set(TQ3RationalPoint3D *point3D, float x, float y, float w)
  73. ;
  74.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  75.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Set
  76.     ENDIF
  77.  
  78. ;
  79. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_Set(TQ3RationalPoint4D *point4D, float x, float y, float z, float w)
  80. ;
  81.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  82.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Set
  83.     ENDIF
  84.  
  85. ;
  86. ; extern TQ3Vector2D *Q3Vector2D_Set(TQ3Vector2D *vector2D, float x, float y)
  87. ;
  88.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  89.         IMPORT_CFM_FUNCTION Q3Vector2D_Set
  90.     ENDIF
  91.  
  92. ;
  93. ; extern TQ3Vector3D *Q3Vector3D_Set(TQ3Vector3D *vector3D, float x, float y, float z)
  94. ;
  95.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  96.         IMPORT_CFM_FUNCTION Q3Vector3D_Set
  97.     ENDIF
  98.  
  99. ;
  100. ; extern TQ3PolarPoint *Q3PolarPoint_Set(TQ3PolarPoint *polarPoint, float r, float theta)
  101. ;
  102.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  103.         IMPORT_CFM_FUNCTION Q3PolarPoint_Set
  104.     ENDIF
  105.  
  106. ;
  107. ; extern TQ3SphericalPoint *Q3SphericalPoint_Set(TQ3SphericalPoint *sphericalPoint, float rho, float theta, float phi)
  108. ;
  109.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  110.         IMPORT_CFM_FUNCTION Q3SphericalPoint_Set
  111.     ENDIF
  112.  
  113.  
  114. ; ******************************************************************************
  115. ; **                                                                             **
  116. ; **                    Point and Vector Dimension Conversion                     **
  117. ; **                                                                             **
  118. ; ****************************************************************************
  119.  
  120. ;
  121. ; extern TQ3Point3D *Q3Point2D_To3D(const TQ3Point2D *point2D, TQ3Point3D *result)
  122. ;
  123.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  124.         IMPORT_CFM_FUNCTION Q3Point2D_To3D
  125.     ENDIF
  126.  
  127. ;
  128. ; extern TQ3Point2D *Q3RationalPoint3D_To2D(const TQ3RationalPoint3D *point3D, TQ3Point2D *result)
  129. ;
  130.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  131.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_To2D
  132.     ENDIF
  133.  
  134. ;
  135. ; extern TQ3RationalPoint4D *Q3Point3D_To4D(const TQ3Point3D *point3D, TQ3RationalPoint4D *result)
  136. ;
  137.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  138.         IMPORT_CFM_FUNCTION Q3Point3D_To4D
  139.     ENDIF
  140.  
  141. ;
  142. ; extern TQ3Point3D *Q3RationalPoint4D_To3D(const TQ3RationalPoint4D *point4D, TQ3Point3D *result)
  143. ;
  144.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  145.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_To3D
  146.     ENDIF
  147.  
  148. ;
  149. ; extern TQ3Vector3D *Q3Vector2D_To3D(const TQ3Vector2D *vector2D, TQ3Vector3D *result)
  150. ;
  151.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  152.         IMPORT_CFM_FUNCTION Q3Vector2D_To3D
  153.     ENDIF
  154.  
  155. ;
  156. ; extern TQ3Vector2D *Q3Vector3D_To2D(const TQ3Vector3D *vector3D, TQ3Vector2D *result)
  157. ;
  158.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  159.         IMPORT_CFM_FUNCTION Q3Vector3D_To2D
  160.     ENDIF
  161.  
  162.  
  163. ; ******************************************************************************
  164. ; **                                                                             **
  165. ; **                            Point Subtraction                                 **
  166. ; **                                                                             **
  167. ; ****************************************************************************
  168.  
  169. ;
  170. ; extern TQ3Vector2D *Q3Point2D_Subtract(const TQ3Point2D *p1, const TQ3Point2D *p2, TQ3Vector2D *result)
  171. ;
  172.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  173.         IMPORT_CFM_FUNCTION Q3Point2D_Subtract
  174.     ENDIF
  175.  
  176. ;
  177. ; extern TQ3Vector2D *Q3Param2D_Subtract(const TQ3Param2D *p1, const TQ3Param2D *p2, TQ3Vector2D *result)
  178. ;
  179.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  180.         IMPORT_CFM_FUNCTION Q3Param2D_Subtract
  181.     ENDIF
  182.  
  183. ;
  184. ; extern TQ3Vector3D *Q3Point3D_Subtract(const TQ3Point3D *p1, const TQ3Point3D *p2, TQ3Vector3D *result)
  185. ;
  186.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  187.         IMPORT_CFM_FUNCTION Q3Point3D_Subtract
  188.     ENDIF
  189.  
  190.  
  191. ; ******************************************************************************
  192. ; **                                                                             **
  193. ; **                            Point Distance                                     **
  194. ; **                                                                             **
  195. ; ****************************************************************************
  196.  
  197. ;
  198. ; extern float Q3Point2D_Distance(const TQ3Point2D *p1, const TQ3Point2D *p2)
  199. ;
  200.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  201.         IMPORT_CFM_FUNCTION Q3Point2D_Distance
  202.     ENDIF
  203.  
  204. ;
  205. ; extern float Q3Point2D_DistanceSquared(const TQ3Point2D *p1, const TQ3Point2D *p2)
  206. ;
  207.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  208.         IMPORT_CFM_FUNCTION Q3Point2D_DistanceSquared
  209.     ENDIF
  210.  
  211.  
  212. ;
  213. ; extern float Q3Param2D_Distance(const TQ3Param2D *p1, const TQ3Param2D *p2)
  214. ;
  215.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  216.         IMPORT_CFM_FUNCTION Q3Param2D_Distance
  217.     ENDIF
  218.  
  219. ;
  220. ; extern float Q3Param2D_DistanceSquared(const TQ3Param2D *p1, const TQ3Param2D *p2)
  221. ;
  222.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  223.         IMPORT_CFM_FUNCTION Q3Param2D_DistanceSquared
  224.     ENDIF
  225.  
  226.  
  227. ;
  228. ; extern float Q3RationalPoint3D_Distance(const TQ3RationalPoint3D *p1, const TQ3RationalPoint3D *p2)
  229. ;
  230.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_Distance
  232.     ENDIF
  233.  
  234. ;
  235. ; extern float Q3RationalPoint3D_DistanceSquared(const TQ3RationalPoint3D *p1, const TQ3RationalPoint3D *p2)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  238.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_DistanceSquared
  239.     ENDIF
  240.  
  241.  
  242. ;
  243. ; extern float Q3Point3D_Distance(const TQ3Point3D *p1, const TQ3Point3D *p2)
  244. ;
  245.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  246.         IMPORT_CFM_FUNCTION Q3Point3D_Distance
  247.     ENDIF
  248.  
  249. ;
  250. ; extern float Q3Point3D_DistanceSquared(const TQ3Point3D *p1, const TQ3Point3D *p2)
  251. ;
  252.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  253.         IMPORT_CFM_FUNCTION Q3Point3D_DistanceSquared
  254.     ENDIF
  255.  
  256.  
  257. ;
  258. ; extern float Q3RationalPoint4D_Distance(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2)
  259. ;
  260.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  261.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Distance
  262.     ENDIF
  263.  
  264. ;
  265. ; extern float Q3RationalPoint4D_DistanceSquared(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2)
  266. ;
  267.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  268.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_DistanceSquared
  269.     ENDIF
  270.  
  271.  
  272. ; ******************************************************************************
  273. ; **                                                                             **
  274. ; **                            Point Relative Ratio                             **
  275. ; **                                                                             **
  276. ; ****************************************************************************
  277.  
  278. ;
  279. ; extern TQ3Point2D *Q3Point2D_RRatio(const TQ3Point2D *p1, const TQ3Point2D *p2, float r1, float r2, TQ3Point2D *result)
  280. ;
  281.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  282.         IMPORT_CFM_FUNCTION Q3Point2D_RRatio
  283.     ENDIF
  284.  
  285. ;
  286. ; extern TQ3Param2D *Q3Param2D_RRatio(const TQ3Param2D *p1, const TQ3Param2D *p2, float r1, float r2, TQ3Param2D *result)
  287. ;
  288.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  289.         IMPORT_CFM_FUNCTION Q3Param2D_RRatio
  290.     ENDIF
  291.  
  292. ;
  293. ; extern TQ3Point3D *Q3Point3D_RRatio(const TQ3Point3D *p1, const TQ3Point3D *p2, float r1, float r2, TQ3Point3D *result)
  294. ;
  295.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION Q3Point3D_RRatio
  297.     ENDIF
  298.  
  299. ;
  300. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_RRatio(const TQ3RationalPoint4D *p1, const TQ3RationalPoint4D *p2, float r1, float r2, TQ3RationalPoint4D *result)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_RRatio
  304.     ENDIF
  305.  
  306.  
  307. ; ******************************************************************************
  308. ; **                                                                             **
  309. ; **                    Point / Vector Addition    & Subtraction                     **
  310. ; **                                                                             **
  311. ; ****************************************************************************
  312.  
  313. ;
  314. ; extern TQ3Point2D *Q3Point2D_Vector2D_Add(const TQ3Point2D *point2D, const TQ3Vector2D *vector2D, TQ3Point2D *result)
  315. ;
  316.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  317.         IMPORT_CFM_FUNCTION Q3Point2D_Vector2D_Add
  318.     ENDIF
  319.  
  320. ;
  321. ; extern TQ3Param2D *Q3Param2D_Vector2D_Add(const TQ3Param2D *param2D, const TQ3Vector2D *vector2D, TQ3Param2D *result)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  324.         IMPORT_CFM_FUNCTION Q3Param2D_Vector2D_Add
  325.     ENDIF
  326.  
  327. ;
  328. ; extern TQ3Point3D *Q3Point3D_Vector3D_Add(const TQ3Point3D *point3D, const TQ3Vector3D *vector3D, TQ3Point3D *result)
  329. ;
  330.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  331.         IMPORT_CFM_FUNCTION Q3Point3D_Vector3D_Add
  332.     ENDIF
  333.  
  334. ;
  335. ; extern TQ3Point2D *Q3Point2D_Vector2D_Subtract(const TQ3Point2D *point2D, const TQ3Vector2D *vector2D, TQ3Point2D *result)
  336. ;
  337.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  338.         IMPORT_CFM_FUNCTION Q3Point2D_Vector2D_Subtract
  339.     ENDIF
  340.  
  341. ;
  342. ; extern TQ3Param2D *Q3Param2D_Vector2D_Subtract(const TQ3Param2D *param2D, const TQ3Vector2D *vector2D, TQ3Param2D *result)
  343. ;
  344.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  345.         IMPORT_CFM_FUNCTION Q3Param2D_Vector2D_Subtract
  346.     ENDIF
  347.  
  348. ;
  349. ; extern TQ3Point3D *Q3Point3D_Vector3D_Subtract(const TQ3Point3D *point3D, const TQ3Vector3D *vector3D, TQ3Point3D *result)
  350. ;
  351.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  352.         IMPORT_CFM_FUNCTION Q3Point3D_Vector3D_Subtract
  353.     ENDIF
  354.  
  355.  
  356. ; ******************************************************************************
  357. ; **                                                                             **
  358. ; **                                Vector Scale                                 **
  359. ; **                                                                             **
  360. ; ****************************************************************************
  361.  
  362. ;
  363. ; extern TQ3Vector2D *Q3Vector2D_Scale(const TQ3Vector2D *vector2D, float scalar, TQ3Vector2D *result)
  364. ;
  365.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  366.         IMPORT_CFM_FUNCTION Q3Vector2D_Scale
  367.     ENDIF
  368.  
  369. ;
  370. ; extern TQ3Vector3D *Q3Vector3D_Scale(const TQ3Vector3D *vector3D, float scalar, TQ3Vector3D *result)
  371. ;
  372.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  373.         IMPORT_CFM_FUNCTION Q3Vector3D_Scale
  374.     ENDIF
  375.  
  376.  
  377. ; ******************************************************************************
  378. ; **                                                                             **
  379. ; **                                Vector Length                                 **
  380. ; **                                                                             **
  381. ; ****************************************************************************
  382.  
  383. ;
  384. ; extern float Q3Vector2D_Length(const TQ3Vector2D *vector2D)
  385. ;
  386.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION Q3Vector2D_Length
  388.     ENDIF
  389.  
  390. ;
  391. ; extern float Q3Vector3D_Length(const TQ3Vector3D *vector3D)
  392. ;
  393.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  394.         IMPORT_CFM_FUNCTION Q3Vector3D_Length
  395.     ENDIF
  396.  
  397.  
  398. ; ******************************************************************************
  399. ; **                                                                             **
  400. ; **                                Vector Normalize                             **
  401. ; **                                                                             **
  402. ; ****************************************************************************
  403.  
  404. ;
  405. ; extern TQ3Vector2D *Q3Vector2D_Normalize(const TQ3Vector2D *vector2D, TQ3Vector2D *result)
  406. ;
  407.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  408.         IMPORT_CFM_FUNCTION Q3Vector2D_Normalize
  409.     ENDIF
  410.  
  411. ;
  412. ; extern TQ3Vector3D *Q3Vector3D_Normalize(const TQ3Vector3D *vector3D, TQ3Vector3D *result)
  413. ;
  414.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  415.         IMPORT_CFM_FUNCTION Q3Vector3D_Normalize
  416.     ENDIF
  417.  
  418.  
  419. ; ******************************************************************************
  420. ; **                                                                             **
  421. ; **                    Vector/Vector Addition and Subtraction                     **
  422. ; **                                                                             **
  423. ; ****************************************************************************
  424.  
  425. ;
  426. ; extern TQ3Vector2D *Q3Vector2D_Add(const TQ3Vector2D *v1, const TQ3Vector2D *v2, TQ3Vector2D *result)
  427. ;
  428.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION Q3Vector2D_Add
  430.     ENDIF
  431.  
  432. ;
  433. ; extern TQ3Vector3D *Q3Vector3D_Add(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  436.         IMPORT_CFM_FUNCTION Q3Vector3D_Add
  437.     ENDIF
  438.  
  439.  
  440. ;
  441. ; extern TQ3Vector2D *Q3Vector2D_Subtract(const TQ3Vector2D *v1, const TQ3Vector2D *v2, TQ3Vector2D *result)
  442. ;
  443.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  444.         IMPORT_CFM_FUNCTION Q3Vector2D_Subtract
  445.     ENDIF
  446.  
  447. ;
  448. ; extern TQ3Vector3D *Q3Vector3D_Subtract(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  449. ;
  450.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  451.         IMPORT_CFM_FUNCTION Q3Vector3D_Subtract
  452.     ENDIF
  453.  
  454.  
  455. ; ******************************************************************************
  456. ; **                                                                             **
  457. ; **                                Cross Product                                 **
  458. ; **                                                                             **
  459. ; ****************************************************************************
  460.  
  461. ;
  462. ; extern float Q3Vector2D_Cross(const TQ3Vector2D *v1, const TQ3Vector2D *v2)
  463. ;
  464.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION Q3Vector2D_Cross
  466.     ENDIF
  467.  
  468. ;
  469. ; extern TQ3Vector3D *Q3Vector3D_Cross(const TQ3Vector3D *v1, const TQ3Vector3D *v2, TQ3Vector3D *result)
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  472.         IMPORT_CFM_FUNCTION Q3Vector3D_Cross
  473.     ENDIF
  474.  
  475. ;
  476. ; extern TQ3Vector3D *Q3Point3D_CrossProductTri(const TQ3Point3D *point1, const TQ3Point3D *point2, const TQ3Point3D *point3, TQ3Vector3D *crossVector)
  477. ;
  478.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION Q3Point3D_CrossProductTri
  480.     ENDIF
  481.  
  482.  
  483. ; ******************************************************************************
  484. ; **                                                                             **
  485. ; **                                Dot Product                                     **
  486. ; **                                                                             **
  487. ; ****************************************************************************
  488.  
  489. ;
  490. ; extern float Q3Vector2D_Dot(const TQ3Vector2D *v1, const TQ3Vector2D *v2)
  491. ;
  492.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION Q3Vector2D_Dot
  494.     ENDIF
  495.  
  496. ;
  497. ; extern float Q3Vector3D_Dot(const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  500.         IMPORT_CFM_FUNCTION Q3Vector3D_Dot
  501.     ENDIF
  502.  
  503.  
  504. ; ******************************************************************************
  505. ; **                                                                             **
  506. ; **                        Point and Vector Transformation                         **
  507. ; **                                                                             **
  508. ; ****************************************************************************
  509.  
  510. ;
  511. ; extern TQ3Vector2D *Q3Vector2D_Transform(const TQ3Vector2D *vector2D, const TQ3Matrix3x3 *matrix3x3, TQ3Vector2D *result)
  512. ;
  513.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  514.         IMPORT_CFM_FUNCTION Q3Vector2D_Transform
  515.     ENDIF
  516.  
  517. ;
  518. ; extern TQ3Vector3D *Q3Vector3D_Transform(const TQ3Vector3D *vector3D, const TQ3Matrix4x4 *matrix4x4, TQ3Vector3D *result)
  519. ;
  520.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  521.         IMPORT_CFM_FUNCTION Q3Vector3D_Transform
  522.     ENDIF
  523.  
  524. ;
  525. ; extern TQ3Point2D *Q3Point2D_Transform(const TQ3Point2D *point2D, const TQ3Matrix3x3 *matrix3x3, TQ3Point2D *result)
  526. ;
  527.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION Q3Point2D_Transform
  529.     ENDIF
  530.  
  531. ;
  532. ; extern TQ3Param2D *Q3Param2D_Transform(const TQ3Param2D *param2D, const TQ3Matrix3x3 *matrix3x3, TQ3Param2D *result)
  533. ;
  534.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  535.         IMPORT_CFM_FUNCTION Q3Param2D_Transform
  536.     ENDIF
  537.  
  538. ;
  539. ; extern TQ3Point3D *Q3Point3D_Transform(const TQ3Point3D *point3D, const TQ3Matrix4x4 *matrix4x4, TQ3Point3D *result)
  540. ;
  541.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  542.         IMPORT_CFM_FUNCTION Q3Point3D_Transform
  543.     ENDIF
  544.  
  545. ;
  546. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_Transform(const TQ3RationalPoint4D *point4D, const TQ3Matrix4x4 *matrix4x4, TQ3RationalPoint4D *result)
  547. ;
  548.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  549.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_Transform
  550.     ENDIF
  551.  
  552. ;
  553. ; extern TQ3Status Q3Point3D_To3DTransformArray(const TQ3Point3D *inPoint3D, const TQ3Matrix4x4 *matrix, TQ3Point3D *outPoint3D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  554. ;
  555.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  556.         IMPORT_CFM_FUNCTION Q3Point3D_To3DTransformArray
  557.     ENDIF
  558.  
  559. ;
  560. ; extern TQ3Status Q3Point3D_To4DTransformArray(const TQ3Point3D *inPoint3D, const TQ3Matrix4x4 *matrix, TQ3RationalPoint4D *outPoint4D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  561. ;
  562.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  563.         IMPORT_CFM_FUNCTION Q3Point3D_To4DTransformArray
  564.     ENDIF
  565.  
  566. ;
  567. ; extern TQ3Status Q3RationalPoint4D_To4DTransformArray(const TQ3RationalPoint4D *inPoint4D, const TQ3Matrix4x4 *matrix, TQ3RationalPoint4D *outPoint4D, long numPoints, unsigned long inStructSize, unsigned long outStructSize)
  568. ;
  569.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  570.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_To4DTransformArray
  571.     ENDIF
  572.  
  573.  
  574. ; ******************************************************************************
  575. ; **                                                                             **
  576. ; **                                Vector Negation                                 **
  577. ; **                                                                             **
  578. ; ****************************************************************************
  579.  
  580. ;
  581. ; extern TQ3Vector2D *Q3Vector2D_Negate(const TQ3Vector2D *vector2D, TQ3Vector2D *result)
  582. ;
  583.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION Q3Vector2D_Negate
  585.     ENDIF
  586.  
  587. ;
  588. ; extern TQ3Vector3D *Q3Vector3D_Negate(const TQ3Vector3D *vector3D, TQ3Vector3D *result)
  589. ;
  590.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  591.         IMPORT_CFM_FUNCTION Q3Vector3D_Negate
  592.     ENDIF
  593.  
  594.  
  595. ; ******************************************************************************
  596. ; **                                                                             **
  597. ; **                    Point conversion from cartesian to polar                 **
  598. ; **                                                                             **
  599. ; ****************************************************************************
  600.  
  601. ;
  602. ; extern TQ3PolarPoint *Q3Point2D_ToPolar(const TQ3Point2D *point2D, TQ3PolarPoint *result)
  603. ;
  604.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  605.         IMPORT_CFM_FUNCTION Q3Point2D_ToPolar
  606.     ENDIF
  607.  
  608. ;
  609. ; extern TQ3Point2D *Q3PolarPoint_ToPoint2D(const TQ3PolarPoint *polarPoint, TQ3Point2D *result)
  610. ;
  611.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  612.         IMPORT_CFM_FUNCTION Q3PolarPoint_ToPoint2D
  613.     ENDIF
  614.  
  615. ;
  616. ; extern TQ3SphericalPoint *Q3Point3D_ToSpherical(const TQ3Point3D *point3D, TQ3SphericalPoint *result)
  617. ;
  618.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  619.         IMPORT_CFM_FUNCTION Q3Point3D_ToSpherical
  620.     ENDIF
  621.  
  622. ;
  623. ; extern TQ3Point3D *Q3SphericalPoint_ToPoint3D(const TQ3SphericalPoint *sphericalPoint, TQ3Point3D *result)
  624. ;
  625.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  626.         IMPORT_CFM_FUNCTION Q3SphericalPoint_ToPoint3D
  627.     ENDIF
  628.  
  629.  
  630. ; ******************************************************************************
  631. ; **                                                                             **
  632. ; **                            Point Affine Combinations                         **
  633. ; **                                                                             **
  634. ; ****************************************************************************
  635.  
  636. ;
  637. ; extern TQ3Point2D *Q3Point2D_AffineComb(const TQ3Point2D *points2D, const float *weights, unsigned long nPoints, TQ3Point2D *result)
  638. ;
  639.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  640.         IMPORT_CFM_FUNCTION Q3Point2D_AffineComb
  641.     ENDIF
  642.  
  643. ;
  644. ; extern TQ3Param2D *Q3Param2D_AffineComb(const TQ3Param2D *params2D, const float *weights, unsigned long nPoints, TQ3Param2D *result)
  645. ;
  646.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  647.         IMPORT_CFM_FUNCTION Q3Param2D_AffineComb
  648.     ENDIF
  649.  
  650. ;
  651. ; extern TQ3RationalPoint3D *Q3RationalPoint3D_AffineComb(const TQ3RationalPoint3D *points3D, const float *weights, unsigned long numPoints, TQ3RationalPoint3D *result)
  652. ;
  653.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  654.         IMPORT_CFM_FUNCTION Q3RationalPoint3D_AffineComb
  655.     ENDIF
  656.  
  657. ;
  658. ; extern TQ3Point3D *Q3Point3D_AffineComb(const TQ3Point3D *points3D, const float *weights, unsigned long numPoints, TQ3Point3D *result)
  659. ;
  660.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  661.         IMPORT_CFM_FUNCTION Q3Point3D_AffineComb
  662.     ENDIF
  663.  
  664. ;
  665. ; extern TQ3RationalPoint4D *Q3RationalPoint4D_AffineComb(const TQ3RationalPoint4D *points4D, const float *weights, unsigned long numPoints, TQ3RationalPoint4D *result)
  666. ;
  667.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  668.         IMPORT_CFM_FUNCTION Q3RationalPoint4D_AffineComb
  669.     ENDIF
  670.  
  671.  
  672. ; ******************************************************************************
  673. ; **                                                                             **
  674. ; **                                Matrix Functions                             **
  675. ; **                                                                             **
  676. ; ****************************************************************************
  677.  
  678. ;
  679. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Copy(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  680. ;
  681.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  682.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Copy
  683.     ENDIF
  684.  
  685. ;
  686. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Copy(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  687. ;
  688.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  689.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Copy
  690.     ENDIF
  691.  
  692.  
  693. ;
  694. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetIdentity(TQ3Matrix3x3 *matrix3x3)
  695. ;
  696.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  697.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetIdentity
  698.     ENDIF
  699.  
  700. ;
  701. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetIdentity(TQ3Matrix4x4 *matrix4x4)
  702. ;
  703.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  704.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetIdentity
  705.     ENDIF
  706.  
  707.  
  708. ;
  709. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Transpose(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  710. ;
  711.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Transpose
  713.     ENDIF
  714.  
  715. ;
  716. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Transpose(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  717. ;
  718.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  719.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Transpose
  720.     ENDIF
  721.  
  722.  
  723. ;
  724. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Invert(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  725. ;
  726.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  727.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Invert
  728.     ENDIF
  729.  
  730. ;
  731. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Invert(const TQ3Matrix4x4 *matrix4x4, TQ3Matrix4x4 *result)
  732. ;
  733.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  734.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Invert
  735.     ENDIF
  736.  
  737.  
  738. ;
  739. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Adjoint(const TQ3Matrix3x3 *matrix3x3, TQ3Matrix3x3 *result)
  740. ;
  741.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  742.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Adjoint
  743.     ENDIF
  744.  
  745.  
  746. ;
  747. ; extern TQ3Matrix3x3 *Q3Matrix3x3_Multiply(const TQ3Matrix3x3 *matrixA, const TQ3Matrix3x3 *matrixB, TQ3Matrix3x3 *result)
  748. ;
  749.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  750.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Multiply
  751.     ENDIF
  752.  
  753. ;
  754. ; extern TQ3Matrix4x4 *Q3Matrix4x4_Multiply(const TQ3Matrix4x4 *matrixA, const TQ3Matrix4x4 *matrixB, TQ3Matrix4x4 *result)
  755. ;
  756.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  757.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Multiply
  758.     ENDIF
  759.  
  760.  
  761. ;
  762. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetTranslate(TQ3Matrix3x3 *matrix3x3, float xTrans, float yTrans)
  763. ;
  764.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  765.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetTranslate
  766.     ENDIF
  767.  
  768. ;
  769. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetScale(TQ3Matrix3x3 *matrix3x3, float xScale, float yScale)
  770. ;
  771.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  772.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetScale
  773.     ENDIF
  774.  
  775.  
  776. ;
  777. ; extern TQ3Matrix3x3 *Q3Matrix3x3_SetRotateAboutPoint(TQ3Matrix3x3 *matrix3x3, const TQ3Point2D *origin, float angle)
  778. ;
  779.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  780.         IMPORT_CFM_FUNCTION Q3Matrix3x3_SetRotateAboutPoint
  781.     ENDIF
  782.  
  783. ;
  784. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetTranslate(TQ3Matrix4x4 *matrix4x4, float xTrans, float yTrans, float zTrans)
  785. ;
  786.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  787.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetTranslate
  788.     ENDIF
  789.  
  790. ;
  791. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetScale(TQ3Matrix4x4 *matrix4x4, float xScale, float yScale, float zScale)
  792. ;
  793.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  794.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetScale
  795.     ENDIF
  796.  
  797.  
  798. ;
  799. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateAboutPoint(TQ3Matrix4x4 *matrix4x4, const TQ3Point3D *origin, float xAngle, float yAngle, float zAngle)
  800. ;
  801.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  802.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateAboutPoint
  803.     ENDIF
  804.  
  805. ;
  806. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateAboutAxis(TQ3Matrix4x4 *matrix4x4, const TQ3Point3D *origin, const TQ3Vector3D *orientation, float angle)
  807. ;
  808.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  809.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateAboutAxis
  810.     ENDIF
  811.  
  812. ;
  813. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_X(TQ3Matrix4x4 *matrix4x4, float angle)
  814. ;
  815.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  816.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_X
  817.     ENDIF
  818.  
  819. ;
  820. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_Y(TQ3Matrix4x4 *matrix4x4, float angle)
  821. ;
  822.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  823.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_Y
  824.     ENDIF
  825.  
  826. ;
  827. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_Z(TQ3Matrix4x4 *matrix4x4, float angle)
  828. ;
  829.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  830.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_Z
  831.     ENDIF
  832.  
  833. ;
  834. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotate_XYZ(TQ3Matrix4x4 *matrix4x4, float xAngle, float yAngle, float zAngle)
  835. ;
  836.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  837.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotate_XYZ
  838.     ENDIF
  839.  
  840. ;
  841. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetRotateVectorToVector(TQ3Matrix4x4 *matrix4x4, const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  842. ;
  843.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  844.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetRotateVectorToVector
  845.     ENDIF
  846.  
  847. ;
  848. ; extern TQ3Matrix4x4 *Q3Matrix4x4_SetQuaternion(TQ3Matrix4x4 *matrix, const TQ3Quaternion *quaternion)
  849. ;
  850.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  851.         IMPORT_CFM_FUNCTION Q3Matrix4x4_SetQuaternion
  852.     ENDIF
  853.  
  854. ;
  855. ; extern float Q3Matrix3x3_Determinant(const TQ3Matrix3x3 *matrix3x3)
  856. ;
  857.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  858.         IMPORT_CFM_FUNCTION Q3Matrix3x3_Determinant
  859.     ENDIF
  860.  
  861. ;
  862. ; extern float Q3Matrix4x4_Determinant(const TQ3Matrix4x4 *matrix4x4)
  863. ;
  864.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  865.         IMPORT_CFM_FUNCTION Q3Matrix4x4_Determinant
  866.     ENDIF
  867.  
  868.  
  869. ; ******************************************************************************
  870. ; **                                                                             **
  871. ; **                                Quaternion Routines                             **
  872. ; **                                                                             **
  873. ; ****************************************************************************
  874.  
  875. ;
  876. ; extern TQ3Quaternion *Q3Quaternion_Set(TQ3Quaternion *quaternion, float w, float x, float y, float z)
  877. ;
  878.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  879.         IMPORT_CFM_FUNCTION Q3Quaternion_Set
  880.     ENDIF
  881.  
  882. ;
  883. ; extern TQ3Quaternion *Q3Quaternion_SetIdentity(TQ3Quaternion *quaternion)
  884. ;
  885.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  886.         IMPORT_CFM_FUNCTION Q3Quaternion_SetIdentity
  887.     ENDIF
  888.  
  889. ;
  890. ; extern TQ3Quaternion *Q3Quaternion_Copy(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  891. ;
  892.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  893.         IMPORT_CFM_FUNCTION Q3Quaternion_Copy
  894.     ENDIF
  895.  
  896. ;
  897. ; extern TQ3Boolean Q3Quaternion_IsIdentity(const TQ3Quaternion *quaternion)
  898. ;
  899.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  900.         IMPORT_CFM_FUNCTION Q3Quaternion_IsIdentity
  901.     ENDIF
  902.  
  903. ;
  904. ; extern TQ3Quaternion *Q3Quaternion_Invert(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  905. ;
  906.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  907.         IMPORT_CFM_FUNCTION Q3Quaternion_Invert
  908.     ENDIF
  909.  
  910. ;
  911. ; extern TQ3Quaternion *Q3Quaternion_Normalize(const TQ3Quaternion *quaternion, TQ3Quaternion *result)
  912. ;
  913.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  914.         IMPORT_CFM_FUNCTION Q3Quaternion_Normalize
  915.     ENDIF
  916.  
  917. ;
  918. ; extern float Q3Quaternion_Dot(const TQ3Quaternion *q1, const TQ3Quaternion *q2)
  919. ;
  920.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  921.         IMPORT_CFM_FUNCTION Q3Quaternion_Dot
  922.     ENDIF
  923.  
  924. ;
  925. ; extern TQ3Quaternion *Q3Quaternion_Multiply(const TQ3Quaternion *q1, const TQ3Quaternion *q2, TQ3Quaternion *result)
  926. ;
  927.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  928.         IMPORT_CFM_FUNCTION Q3Quaternion_Multiply
  929.     ENDIF
  930.  
  931. ;
  932. ; extern TQ3Quaternion *Q3Quaternion_SetRotateAboutAxis(TQ3Quaternion *quaternion, const TQ3Vector3D *axis, float angle)
  933. ;
  934.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  935.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotateAboutAxis
  936.     ENDIF
  937.  
  938. ;
  939. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_XYZ(TQ3Quaternion *quaternion, float xAngle, float yAngle, float zAngle)
  940. ;
  941.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  942.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_XYZ
  943.     ENDIF
  944.  
  945. ;
  946. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_X(TQ3Quaternion *quaternion, float angle)
  947. ;
  948.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  949.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_X
  950.     ENDIF
  951.  
  952. ;
  953. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_Y(TQ3Quaternion *quaternion, float angle)
  954. ;
  955.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  956.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_Y
  957.     ENDIF
  958.  
  959. ;
  960. ; extern TQ3Quaternion *Q3Quaternion_SetRotate_Z(TQ3Quaternion *quaternion, float angle)
  961. ;
  962.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  963.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotate_Z
  964.     ENDIF
  965.  
  966.  
  967. ;
  968. ; extern TQ3Quaternion *Q3Quaternion_SetMatrix(TQ3Quaternion *quaternion, const TQ3Matrix4x4 *matrix)
  969. ;
  970.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  971.         IMPORT_CFM_FUNCTION Q3Quaternion_SetMatrix
  972.     ENDIF
  973.  
  974. ;
  975. ; extern TQ3Quaternion *Q3Quaternion_SetRotateVectorToVector(TQ3Quaternion *quaternion, const TQ3Vector3D *v1, const TQ3Vector3D *v2)
  976. ;
  977.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  978.         IMPORT_CFM_FUNCTION Q3Quaternion_SetRotateVectorToVector
  979.     ENDIF
  980.  
  981. ;
  982. ; extern TQ3Quaternion *Q3Quaternion_MatchReflection(const TQ3Quaternion *q1, const TQ3Quaternion *q2, TQ3Quaternion *result)
  983. ;
  984.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  985.         IMPORT_CFM_FUNCTION Q3Quaternion_MatchReflection
  986.     ENDIF
  987.  
  988. ;
  989. ; extern TQ3Quaternion *Q3Quaternion_InterpolateFast(const TQ3Quaternion *q1, const TQ3Quaternion *q2, float t, TQ3Quaternion *result)
  990. ;
  991.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  992.         IMPORT_CFM_FUNCTION Q3Quaternion_InterpolateFast
  993.     ENDIF
  994.  
  995. ;
  996. ; extern TQ3Quaternion *Q3Quaternion_InterpolateLinear(const TQ3Quaternion *q1, const TQ3Quaternion *q2, float t, TQ3Quaternion *result)
  997. ;
  998.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  999.         IMPORT_CFM_FUNCTION Q3Quaternion_InterpolateLinear
  1000.     ENDIF
  1001.  
  1002. ;
  1003. ; extern TQ3Vector3D *Q3Vector3D_TransformQuaternion(const TQ3Vector3D *vector3D, const TQ3Quaternion *quaternion, TQ3Vector3D *result)
  1004. ;
  1005.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1006.         IMPORT_CFM_FUNCTION Q3Vector3D_TransformQuaternion
  1007.     ENDIF
  1008.  
  1009. ;
  1010. ; extern TQ3Point3D *Q3Point3D_TransformQuaternion(const TQ3Point3D *point3D, const TQ3Quaternion *quaternion, TQ3Point3D *result)
  1011. ;
  1012.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1013.         IMPORT_CFM_FUNCTION Q3Point3D_TransformQuaternion
  1014.     ENDIF
  1015.  
  1016.  
  1017. ; ******************************************************************************
  1018. ; **                                                                             **
  1019. ; **                                Volume Routines                                 **
  1020. ; **                                                                             **
  1021. ; ****************************************************************************
  1022.  
  1023. ;
  1024. ; extern TQ3BoundingBox *Q3BoundingBox_Copy(const TQ3BoundingBox *src, TQ3BoundingBox *dest)
  1025. ;
  1026.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1027.         IMPORT_CFM_FUNCTION Q3BoundingBox_Copy
  1028.     ENDIF
  1029.  
  1030. ;
  1031. ; extern TQ3BoundingBox *Q3BoundingBox_Union(const TQ3BoundingBox *v1, const TQ3BoundingBox *v2, TQ3BoundingBox *result)
  1032. ;
  1033.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1034.         IMPORT_CFM_FUNCTION Q3BoundingBox_Union
  1035.     ENDIF
  1036.  
  1037. ;
  1038. ; extern TQ3BoundingBox *Q3BoundingBox_Set(TQ3BoundingBox *bBox, const TQ3Point3D *min, const TQ3Point3D *max, TQ3Boolean isEmpty)
  1039. ;
  1040.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1041.         IMPORT_CFM_FUNCTION Q3BoundingBox_Set
  1042.     ENDIF
  1043.  
  1044. ;
  1045. ; extern TQ3BoundingBox *Q3BoundingBox_UnionPoint3D(const TQ3BoundingBox *bBox, const TQ3Point3D *point3D, TQ3BoundingBox *result)
  1046. ;
  1047.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1048.         IMPORT_CFM_FUNCTION Q3BoundingBox_UnionPoint3D
  1049.     ENDIF
  1050.  
  1051. ;
  1052. ; extern TQ3BoundingBox *Q3BoundingBox_UnionRationalPoint4D(const TQ3BoundingBox *bBox, const TQ3RationalPoint4D *point4D, TQ3BoundingBox *result)
  1053. ;
  1054.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1055.         IMPORT_CFM_FUNCTION Q3BoundingBox_UnionRationalPoint4D
  1056.     ENDIF
  1057.  
  1058. ;
  1059. ; extern TQ3BoundingBox *Q3BoundingBox_SetFromPoints3D(TQ3BoundingBox *bBox, const TQ3Point3D *points3D, unsigned long numPoints, unsigned long structSize)
  1060. ;
  1061.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1062.         IMPORT_CFM_FUNCTION Q3BoundingBox_SetFromPoints3D
  1063.     ENDIF
  1064.  
  1065. ;
  1066. ; extern TQ3BoundingBox *Q3BoundingBox_SetFromRationalPoints4D(TQ3BoundingBox *bBox, const TQ3RationalPoint4D *points4D, unsigned long numPoints, unsigned long structSize)
  1067. ;
  1068.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1069.         IMPORT_CFM_FUNCTION Q3BoundingBox_SetFromRationalPoints4D
  1070.     ENDIF
  1071.  
  1072.  
  1073. ; ******************************************************************************
  1074. ; **                                                                             **
  1075. ; **                                Sphere Routines                                 **
  1076. ; **                                                                             **
  1077. ; ****************************************************************************
  1078.  
  1079. ;
  1080. ; extern TQ3BoundingSphere *Q3BoundingSphere_Copy(const TQ3BoundingSphere *src, TQ3BoundingSphere *dest)
  1081. ;
  1082.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1083.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Copy
  1084.     ENDIF
  1085.  
  1086. ;
  1087. ; extern TQ3BoundingSphere *Q3BoundingSphere_Union(const TQ3BoundingSphere *s1, const TQ3BoundingSphere *s2, TQ3BoundingSphere *result)
  1088. ;
  1089.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1090.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Union
  1091.     ENDIF
  1092.  
  1093. ;
  1094. ; extern TQ3BoundingSphere *Q3BoundingSphere_Set(TQ3BoundingSphere *bSphere, const TQ3Point3D *origin, float radius, TQ3Boolean isEmpty)
  1095. ;
  1096.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1097.         IMPORT_CFM_FUNCTION Q3BoundingSphere_Set
  1098.     ENDIF
  1099.  
  1100. ;
  1101. ; extern TQ3BoundingSphere *Q3BoundingSphere_UnionPoint3D(const TQ3BoundingSphere *bSphere, const TQ3Point3D *point3D, TQ3BoundingSphere *result)
  1102. ;
  1103.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1104.         IMPORT_CFM_FUNCTION Q3BoundingSphere_UnionPoint3D
  1105.     ENDIF
  1106.  
  1107. ;
  1108. ; extern TQ3BoundingSphere *Q3BoundingSphere_UnionRationalPoint4D(const TQ3BoundingSphere *bSphere, const TQ3RationalPoint4D *point4D, TQ3BoundingSphere *result)
  1109. ;
  1110.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1111.         IMPORT_CFM_FUNCTION Q3BoundingSphere_UnionRationalPoint4D
  1112.     ENDIF
  1113.  
  1114.  
  1115. ;
  1116. ; extern TQ3BoundingSphere *Q3BoundingSphere_SetFromPoints3D(TQ3BoundingSphere *bSphere, const TQ3Point3D *points3D, unsigned long numPoints, unsigned long structSize)
  1117. ;
  1118.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1119.         IMPORT_CFM_FUNCTION Q3BoundingSphere_SetFromPoints3D
  1120.     ENDIF
  1121.  
  1122. ;
  1123. ; extern TQ3BoundingSphere *Q3BoundingSphere_SetFromRationalPoints4D(TQ3BoundingSphere *bSphere, const TQ3RationalPoint4D *points4D, unsigned long numPoints, unsigned long structSize)
  1124. ;
  1125.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1126.         IMPORT_CFM_FUNCTION Q3BoundingSphere_SetFromRationalPoints4D
  1127.     ENDIF
  1128.  
  1129.  
  1130.  
  1131.  
  1132.     ENDIF ; __QD3DMATH__ 
  1133.  
  1134.